home *** CD-ROM | disk | FTP | other *** search
- on SetVolume NiveauVolume
- global MemoVolume
- set the soundLevel to NiveauVolume
- updateStage()
- set MemoVolume to NiveauVolume
- end
-
- on StoreVolume
- global MemoVolume
- updateStage()
- set MemoVolume to the soundLevel
- end
-
- on RestoreVolume
- global MemoVolume
- set the soundLevel to MemoVolume
- updateStage()
- end
-
- on Cson Piste
- if paramCount() <> 0 then
- sound stop param(1)
- else
- sound stop 1
- sound stop 2
- sound stop 3
- sound stop 4
- end if
- updateStage()
- end
-
- on PlayClick Op
- if soundBusy(1) then
- exit
- end if
- PlaySound(1, "Puppet", "clic")
- if paramCount() <> 0 then
- updateStage()
- end if
- end
-
- on ClicPlusWait
- if soundBusy(1) then
- exit
- end if
- PlaySound(1, "Puppet", "clic")
- updateStage()
- WaitFinSon()
- end
-
- on PlaySound Piste, type, Fichier, volumePiste
- global glQTmemo, listFichSound, MemoVolume
- TestPresenceQT()
- if getAt(glQTmemo, 2) <> 0 then
- if (the movieRate of sprite getAt(glQTmemo, 1) <> 0) and stringp(Fichier) and (Piste = 1) then
- exit
- end if
- end if
- set the soundLevel to MemoVolume
- set Fichier to MakeSeparator(Fichier)
- set PosRef to Piste * 2
- setAt(listFichSound, PosRef + 1, MakeNomPropre(Fichier))
- setAt(listFichSound, PosRef + 2, type)
- if type = "PLAY" then
- sound playFile Piste, Fichier
- else
- puppetSound(Fichier)
- end if
- if voidp(volumePiste) then
- set volumePiste to 255
- end if
- set the volume of sound Piste to volumePiste
- end
-
- on PlaySoundVide Piste, type, Fichier, volumePiste
- if soundBusy(Piste) = 0 then
- PlaySound(Piste, type, Fichier, volumePiste)
- end if
- end
-
- on PlaySoundTest Piste, type, Fichier, volumePiste
- global listFichSound
- if soundBusy(Piste) <> 0 then
- if MakeNomPropre(Fichier) = getAt(listFichSound, (Piste * 2) + 1) then
- exit
- end if
- end if
- PlaySound(Piste, type, Fichier, volumePiste)
- end
-
- on PlaySoundNotAgain Piste, type, Fichier, volumePiste
- global listFichSound
- if MakeNomPropre(Fichier) = getAt(listFichSound, (Piste * 2) + 1) then
- exit
- end if
- PlaySound(Piste, type, Fichier, volumePiste)
- end
-
- on SetSoundPara Piste, type, Fichier, volumePiste
- global glQTmemo, listFichSound
- TestPresenceQT()
- if getAt(glQTmemo, 1) <> 0 then
- if the movieRate of sprite getAt(glQTmemo, 1) <> 0 then
- exit
- end if
- end if
- set PosRef to Piste * 2
- setAt(listFichSound, PosRef + 1, MakeNomPropre(Fichier))
- setAt(listFichSound, PosRef + 2, type)
- end
-
- on SetDcKeepSound
- global listKeepSound
- set listKeepSound to list()
- end
-
- on KeepSound Piste, type, Fichier, volumePiste
- global listKeepSound
- updateStage()
- set listKeepSound to list(Piste, type, Fichier, volumePiste)
- GestKeepSound()
- end
-
- on GestKeepSound
- global listKeepSound
- if listKeepSound = [] then
- exit
- end if
- if soundBusy(getAt(listKeepSound, 1)) then
- exit
- end if
- PlaySound(getAt(listKeepSound, 1), getAt(listKeepSound, 2), getAt(listKeepSound, 3), getAt(listKeepSound, 4))
- end
-
- on DiaporamaOff
- global listDiapo
- if voidp(listDiapo) then
- set listDiapo to list()
- end if
- if listDiapo = list() then
- exit
- end if
- set ParaSup to getAt(listDiapo, count(listDiapo))
- if offset("KDS", ParaSup) <> 0 then
- set Piste to getAt(listDiapo, 5)
- if getAt(listDiapo, 6) <> "Quick" then
- Cson(Piste)
- else
- QTspriteEfface(Piste)
- end if
- end if
- if offset("KDC", ParaSup) <> 0 then
- set SprCast to getAt(listDiapo, 7)
- puppetSprite(SprCast, 1)
- set the castNum of sprite SprCast to -1
- updateStage()
- puppetSprite(SprCast, 0)
- end if
- set lastMacro to the last word in ParaSup
- if offset("LM", lastMacro) <> 0 then
- do(lastMacro)
- end if
- set listDiapo to list()
- end
-
- on SetDiaporama Piste, type, NomFichier, volume, PisteCastnum, ParaSound, ParaPreload
- global listDiapo, CastEfface
- set listDiapo to list(8, CastEfface, 0, 0, Piste, type, PisteCastnum)
- set Pz to 1
- repeat with compt = 1 to (the number of words in ParaSound - 1) / 4
- add(listDiapo, value(word Pz of ParaSound))
- set NumCast to the number of cast word Pz + 1 of ParaSound
- if (NumCast <> -1) and (ParaPreload = 1) then
- preLoadCast(NumCast)
- updateStage()
- end if
- add(listDiapo, NumCast)
- add(listDiapo, word Pz + 2 of ParaSound)
- set Pz to Pz + 4
- end repeat
- add(listDiapo, "FIN")
- set ParaSup to "# "
- if offset("KDC", ParaSound) <> 0 then
- set ParaSup to ParaSup & "KDC "
- end if
- if offset("KDS", ParaSound) <> 0 then
- set ParaSup to ParaSup & "KDS "
- end if
- set lastMacro to the last word in ParaSound
- if offset("LM", lastMacro) <> 0 then
- set ParaSup to ParaSup & lastMacro
- end if
- add(listDiapo, ParaSup)
- set NumCast to getAt(listDiapo, 9)
- if NumCast <> -1 then
- preLoadCast(NumCast)
- updateStage()
- end if
- puppetSprite(PisteCastnum, 1)
- if type = "Quick" then
- QTspriteStart([Piste, NomFichier, 0, 0, volume, 0, 1, 0, 1, 0, 1, 0, 0, 0])
- QTspriteStartEndTime([Piste, 1, "Fin"])
- QTspriteStart([Piste, #auto, 1, 1])
- updateStage()
- setAt(listDiapo, 3, 0)
- else
- if NomFichier <> "Nothing" then
- PlaySound(Piste, type, NomFichier, volume)
- end if
- updateStage()
- setAt(listDiapo, 3, the ticks)
- end if
- setAt(listDiapo, 4, getAt(listDiapo, 3) + getAt(listDiapo, 8))
- GestSoundCast()
- end
-
- on GestSoundCast
- global listDiapo
- if listDiapo = [] then
- exit
- end if
- if getAt(listDiapo, 6) = "Quick" then
- if getAt(listDiapo, 4) > the movieTime of sprite getAt(listDiapo, 5) then
- exit
- end if
- else
- if getAt(listDiapo, 4) > the ticks then
- exit
- end if
- end if
- set Compteur to getAt(listDiapo, 1)
- set CastAAfficher to getAt(listDiapo, Compteur + 1)
- set PisteSprite to getAt(listDiapo, 7)
- set LastCast to getAt(listDiapo, 2)
- do(getAt(listDiapo, Compteur + 2))
- if CastAAfficher <> -1 then
- set the castNum of sprite PisteSprite to CastAAfficher
- updateStage()
- unLoadCast(LastCast)
- if listDiapo = list() then
- exit
- end if
- setAt(listDiapo, 2, CastAAfficher)
- end if
- if listDiapo = [] then
- exit
- end if
- set Compteur to Compteur + 3
- setAt(listDiapo, 1, Compteur)
- if getAt(listDiapo, Compteur) = "FIN" then
- return DiaporamaOff()
- end if
- setAt(listDiapo, 4, getAt(listDiapo, 3) + getAt(listDiapo, Compteur))
- end
-
- on SetDcSoundCast
- DiaporamaOff()
- end
-
- on SetSound type, NomSoundOuPisteQuick, PisteCastnum, ParaSound, NomCast
- if type = "Quick" then
- if the paramCount < 5 then
- set NomCast to #auto
- end if
- SetDiaporama(NomSoundOuPisteQuick, type, NomCast, 255, PisteCastnum, ParaSound, 0)
- else
- SetDiaporama(1, type, NomSoundOuPisteQuick, 255, PisteCastnum, ParaSound, 0)
- end if
- end
-